//
//  MYMySetRevampCodeCell.swift
//  MuYing
//
//  Created by tbb on 2019/8/8.
//  Copyright © 2019 TBB. All rights reserved.
//

import UIKit

class MYMySetRevampCodeCell: MYLoginBaseTextFieldCell {

    @objc lazy var codeBtn: UIButton = {
        let codeBtn = UIButton(type: .custom);
        codeBtn.setTitleColor(UIColorFromHex(rgbValue: 0xCBCBCB), for: .normal)
        codeBtn.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
        codeBtn.setTitle(kYQLSSwift("发送验证码"), for: .normal)
        codeBtn.frame = CGRect(x: 0, y: 0, width: 62, height: 21)
        return codeBtn;
    }()
    
    override func layoutSubviews() {
        super.layoutSubviews();
        self.leftIcon.isHidden = true;
        self.textField.textColor = appMainTitleColor;
        self.textField.mas_makeConstraints { (make) in
            make?.centerY.mas_equalTo()(0);
            make?.left.mas_equalTo()(12);
            make?.right.mas_equalTo()(-12);
            make?.height.mas_equalTo()(21);
        }
        
        self.lineView.mas_makeConstraints { (make) in
            make?.bottom.mas_equalTo()(0)
            make?.left.mas_equalTo()(0);
            make?.right.mas_equalTo()(0);
            make?.height.mas_equalTo()(1);
        }
        
        self.textField.rightView = codeBtn;
        self.textField.rightViewMode = .always;
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
